const path=require('path')
const htmlPlugin=require("html-webpack-plugin")
// const VueLoaderPlugin = require('vue-loader/lib/plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports={
    entry:path.join(__dirname,'/src/index.js'),
    output:{
        filename:'main.js',
        path:path.join(__dirname,'/dist'),
    },
    module:{
        rules:[
            {test:/\.css$/,use:['style-loader','css-loader']},
            {test:/\.vue$/,use:'vue-loader'}
        ]
    },
    plugins:[
        new htmlPlugin({
            template:path.join(__dirname,'./src/index.html'),
            filename:'index.html'
        }),
        new VueLoaderPlugin()
    ]
   
}